import evn from '../../config/env';
import * as mongoose from 'mongoose';

let db = mongoose.createConnection(evn.dbUrl, {user: evn.dbUser, pass: evn.dbPass });
db.on('error', console.error.bind(console, '连接错误:'));
db.once('open', function () {
    //一次打开记录
    console.log('本地数据库被打开.........');
});
export default db; 